@echo off
sc create Consul ^
    binpath= "%~dp0consul.exe agent -server -ui -bind=127.0.0.1 -client=0.0.0.0 -bootstrap-expect 1 -data-dir %~dp0\data" ^
    displayname= "Consul Server"
REM sc config Consul start= AUTO  
REM sc config MyService start= auto & sc config MyService type= own & sc start MyServ
pause